package com.ktjy.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ktjy.dto.CourseDTO;
import com.ktjy.pojo.TbCourse;
import com.ktjy.mapper.TbCourseMapper;
import com.ktjy.service.ITbCourseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程管理 服务实现类
 * </p>
 *
 * @author jjx
 * @since 2025-08-02
 */
@Service
public class TbCourseServiceImpl extends ServiceImpl<TbCourseMapper, TbCourse> implements ITbCourseService {
    @Autowired
    TbCourseMapper tbCourseMapper;

    @Override
    public IPage<TbCourse> findPage(CourseDTO courseDTO, Integer pageNo, Integer pageSize) {
        //构造分页条件
        Page page=new Page(pageNo,pageSize);
        return tbCourseMapper.selectPage(page,courseDTO);
    }
}
